function DataTableViewUtil() {
	
};



DataTableViewUtil.prototype.addDataTableToDiv = function(dataTableDivId,tabDivId) {
	
	var bookorders = [
		        {id:"po-0167", date:new Date(1980, 2, 24)       ,from:"Lalit Sharma"  ,type:"Buy"  ,subtype:"Car"        ,title:"A Book About Nothing"                 ,description:"This is sample description"},
		        {id:"po-0783", date:new Date("January 3, 1983") ,from:"Tushar Pagar"  ,type:"Sell" ,subtype:"Apartment"  ,title:"The Meaning of Life"                  ,description:"This is sample description"},
		        {id:"po-0297", date:new Date(1978, 11, 12)      ,from:"Yuvraj Sawant" ,type:"Sell" ,subtype:"Bike"       ,title:"This Book Was Meant to Be Read Aloud" ,description:"This is sample description"},
		        {id:"po-1482", date:new Date("March 11, 1985")  ,from:"Sudhir Yadav"  ,type:"Sell" ,subtype:"House Hold" ,title:"Read Me Twice"						   ,description:"This is sample description"}
		    ];
	
	 var myColumnDefs = [
	     	            {key:"id"          , label:"Id"     		, sortable:true, resizeable:true ,minWidth:"100"},
	     	            {key:"date"        , label:"Date"   		,formatter:YAHOO.widget.DataTable.formatDate, sortable:true, sortOptions:{defaultDir:YAHOO.widget.DataTable.CLASS_DESC},resizeable:true},
	     	            {key:"from"        , label:"From"     		,sortable:true, resizeable:true,minWidth:"100"},
	     	            {key:"type"        , label:"Type"     		,sortable:true, resizeable:true,minWidth:"70"},
	     	            {key:"subtype"	   , label:"Sub Type"	    ,sortable:true, resizeable:true,minWidth:"100"},
	     	            {key:"title"       , label:"Title"			,sortable:true, resizeable:true,minWidth:"300"},
	     	            {key:"description" , label:"Description"	,sortable:true, resizeable:true}
	     	            //{key:"Type", formatter:YAHOO.widget.DataTable.formatNumber, sortable:true, resizeable:true},	
	     	            //{key:"amount", formatter:YAHOO.widget.DataTable.formatCurrency, sortable:true, resizeable:true},
	     	            
	     	        ];
	 
	 var myDataSource = new YAHOO.util.DataSource(bookorders);
	 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
     myDataSource.responseSchema = {
         fields: ["id","date","from","type","subtype","title", "description"]
     };
     
	
	var myDataTable = new YAHOO.widget.DataTable(dataTableDivId,myColumnDefs, myDataSource,{scrollable:true,width:"auto"});
	
	var myTabView = new YAHOO.widget.TabView(tabDivId); 
	myTabView.getTab(1).addListener("click", function() {myDataTable.onShow()});  
	
	 return {
		 oDS: myDataSource, 
		 oDT: myDataTable, 
		 oTV: myTabView 
     };
     
}